const CracoLessPlugin = require('craco-less');

module.exports = {
    eslint: {
        enable: false,
    },
    plugins: [
        {
            plugin: CracoLessPlugin,
            options: {
                lessLoaderOptions: {
                    lessOptions: {
                        javascriptEnabled: true
                    }
                }
            }
        }
    ],
    webpack: {
        configure: (webpackConfig, {env, paths}) => {
            paths.appBuild = 'render';
            webpackConfig.output = {
                ...webpackConfig.output,
                path: require('path').resolve(__dirname, 'render'),
                publicPath: '/'
            };

            return webpackConfig;
        },
    }
};